package com.yazdankhah.beans;

import java.io.Serializable;

/**
 *
 * @author ahmad
 */
public class LeftOff implements Serializable {

  //NOTE that all fields are OBJECTS.
  
  private Long userId;

  private Short serial;

  private static final long serialVersionUID = 1L;

  
  public LeftOff() {
  }


  public LeftOff(Long userId) {
    this.userId = userId;
  }


  public LeftOff(Long userId, Short serial) {
    this.userId = userId;
    this.serial = serial;
  }
  

  public Long getUserId() {
    return userId;
  }


  public void setUserId(Long userId) {
    this.userId = userId;
  }


  public Short getSerial() {
    return serial;
  }


  public void setSerial(Short serial) {
    this.serial = serial;
  }


  @Override
  public int hashCode() {
    int hash = 0;
    hash += (userId != null ? userId.hashCode() : 0);
    return hash;
  }


  @Override
  public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof LeftOff)) {
      return false;
    }
    LeftOff other = (LeftOff) object;
    return (this.userId != null || other.userId == null) &&
           (this.userId == null || this.userId.equals(other.userId));
  }


  @Override
  public String toString() {
    return "com.yazdankhah.beans.LeftOff[userId=" + userId + "][serial=" + serial + "]";
  }
  
} //class
